<template>
	<div class="app-container">

		<div class="app-box">
			<div class="p-detail">
				<p style='position:relative'>
					<i class="iconfont icon-baoxianchanpin"></i>
					<span class='set10'>{{info.batchName}}</span>
					<span class="add" v-if='info.isReward'>奖励</span>
					<span class="state state1" v-if='info.state==0'>编辑中</span>
					<span class="state state2" v-else-if='info.state==3'>生效中</span>
					<span class="state state3" v-else-if='info.state==4'>已过期</span>
					<span class="state state4" v-else-if='info.state==1'>待审批</span>
					<span class="state state5" v-else-if='info.state==5'>已驳回</span>
					<span class="state state6" v-else-if='info.state==2'>待生效</span>
					<span class="editbatch">
						<el-button size="mini" type="info" @click="backs">返回</el-button>
						<el-button size="mini" class="editbatch_edit" @click="batchedit" v-if="info.state==0||info.state==5">编辑批次信息</el-button>
					</span>
				</p>
				<div v-if='info.state==5' class="Dismissal">
					驳回原因：{{info.dismissalSeason}}
				</div>
				<el-dialog title="编辑批次信息" :visible.sync="isshow" width="650px" :close-on-click-modal=false>
					<el-form :model="copyinfo" :rules="rules" ref="copyinfo" label-width="100px" class="demo-ruleForm">
						<el-form-item class="informationaa" label="批次名称:" prop="batchName">
							<el-input v-model="copyinfo.batchName" class="selects" size="mini" placeholder="请输入批次名称"></el-input>
						</el-form-item>

						<el-form-item class="informationaa" label="保险公司:" prop="insuranceId">
							<el-select class="selects" size="mini" disabled v-model="copyinfo.insuranceId" placeholder="请选择保险公司" @change="changecomony(copyinfo.insuranceId)">
								<el-option-group v-for="group in options" :key="group.letter" :label="group.letter">
									<el-option v-for="item in group.insurances" :key="item.id" :label="item.insuranceName" :value="item.id">
									</el-option>
								</el-option-group>
							</el-select>
						</el-form-item>

						<el-form-item class="informationaa" label="适用工号:" prop="staffId">
							<el-select class="selects" size="mini" v-model="copyinfo.staffId" multiple placeholder="请选择">
								<el-option class="selects" v-for="item in workoptions" :key="item.id" :label="item.staffAccount" :value="item.id">
								</el-option>
							</el-select>
						</el-form-item>
						<el-form-item class="informationaa" style="width:514px;margin:0 0 20px 0" :class="{'begin-error':errormsg.beginerror,'end-error':errormsg.enderror}" label="有效时间:" required>
							<datachange :json="copyinfo" v-on:inf='inf'></datachange>

							<div class="el-form-item__error" v-if="errormsg.beginerror||errormsg.enderror">
								{{errormsg.message}}
							</div>
							<div class="z-errorbox">
								<div class="z-error texts">
									<i class="iconfont icon-xuanzhong"></i> 以<span>{{copyinfo.matchDateType}}</span>作为匹配日期类型
								</div>
							</div>

						</el-form-item>
						<!-- <div  style="margin:0;width:514px;">
						<datachange :json="copyinfo"></datachange>
					</div>
					
					<el-form-item class="informationaa informationaa_pipei" label=" ">
						<p class="texts">
							<i class="iconfont icon-xuanzhong"></i> 以<span>{{copyinfo.matchDateType}}</span>作为匹配日期类型
						</p>
					</el-form-item> -->
						<el-form-item class="informationaa informationdd">
							<el-button :loading="loading1" type="primary" size="small" class="btn" @click="btn('copyinfo')">确定</el-button>
						</el-form-item>
					</el-form>
				</el-dialog>

				<div class="d-box" >
					<!--<div class="editbatch" >
						<el-button size="mini" type="info" @click="backs">返回</el-button>
						<el-button  size="mini" class="editbatch_edit"  @click="batchedit" v-if="info.state==0||info.state==5">编辑批次信息</el-button>
					</div>-->
					<p>
						<span>保险公司：</span>
						<span class="d-setc">{{info.insuranceName}}</span>
						<span class="set30">有效日期：</span>
						<span class="d-setc">{{info.effectiveDate}} 到 &nbsp;</span>
						<span class="d-setc" v-if="info.expiryDate">{{info.expiryDate}}&nbsp;&nbsp;</span>
						<span class="d-setc" v-else>不限</span>

						<span class="set30">匹配日期类型：</span>
						<span class="d-setc">{{info.matchDateType}}</span>&nbsp;&nbsp;
					</p>
					<div class="minflao">
						<span class="minflao_first">适用工号：</span>
						<span class="d-setc" v-for='(item,index) in info.staffNames'>
							<span class="isF">&nbsp;&nbsp;|&nbsp;&nbsp;</span>{{item.staffAccount}}（{{item.describe}}）
						<span v-if="info.staffNames.length-1!=index">，</span>
						</span>
						<div style="clear:both"></div>
					</div>

					
					<div class="minflao">
						<span class="minflao_first">总保单数：</span>
						<span class="d-setc">{{matchInfo.totalCount?matchInfo.totalCount:'-'}}</span>
						<span class="minflao_first set30">已匹配保单数：</span>
						<span class="d-setc">{{matchInfo.matchCount ?matchInfo.matchCount:'-'}}</span>
						<span class="minflao_first set30">未匹配保单数：</span>
						<span class="d-setc">{{matchInfo.notMatchCount ?matchInfo.notMatchCount:'-'}}</span>
						<span class="minflao_first set30">待匹配保单数：</span>
						<span class="d-setc">{{matchInfo.waitMatchCount?matchInfo.waitMatchCount:'-' }}</span>
						<span class="minflao_first set30"><a @click="getPi(1)" style="color:#027dca;text-decoration: underline;">刷新</a>  <i  v-show="shua" class="el-icon-loading"></i></span>
						
						<div style="clear:both"></div>
					</div>
				</div>
			</div>
			<div class="p-list">
				<div class="tables">
					<div class="tables_top">
						<div class="tablestop_left">
							<span>#</span>
							<span class="tablestop_dir">政策描述</span>
						</div>
						<div class="tablestop_cen">
							<div class="cen_top">
								<span class="cen_top_bor">交强险</span>
								<span class="cen_top_bor">商业险</span>
								<span class="cen_top_che">车船税</span>
							</div>
							<div class="cen_bom">
								<span class="cen_top_bor">
									<span>佣金</span>
								<span>奖励</span>
								</span>
								<span class="cen_top_bor">
									<span>佣金</span>
								<span>奖励</span>
								</span>
								<span class="cen_top_che">
									<span>佣金</span>
								</span>
							</div>
						</div>
						<div class="tablestop_right">
							操作
						</div>
					</div>
					<div class="tables_cont" v-for='(item,index) in policylist'>
						<div class="tablescont_left">
							<i class="iconfont posIcon" :class="!item.detailshow?'icon-tianjia':'icon-jianqu'" @click="isdetailshow(index,item)"></i>
							<div :class="numIndex==index?'tablescont_num2':'tablescont_num'">
								<span class="spanhover" v-show="!(numIndex==index)" @click="changeSelect(index,item)">{{item.serialNumber | changeNumber}}</span>
								 <!-- <i class="iconfont icon-bianji iIcon" ></i> -->
								<el-select v-model="item.serialNumber" :disabled="iscanedit" placeholder="请选择" size="mini" v-show="numIndex==index" class="selectIndex" @change="changeSelectIndex">
									<el-option
									v-for="item in snumbers"
									:key="item.id"
									:label="item.label"
									:value="item.value">
									</el-option>
								</el-select>
							</div>
							<div class="tablescont_dis">{{item.remarks}}</div>
						</div>

						<!--<template>
						<el-popover
					trigger="hover"
						
					  placement="right-end"
					  width="40"
					  v-model="item.hovershow">
					  <div class="poper_operation">
					    <span type="text"  @click="subfalse(index)">取消</span>
					    <span type="text" @click="subpolicy(item,index)">保存</span>
					  </div>
					  <div class="tablescont_cen" :class="item.isbackshow?'backshows':''" slot="reference">
						<span class="cen_top_bor tablescont_cen_float">
								<span class="tablescontcen_input" :class="item.change1?'ischange1':''">
									<span v-if="item.chargeType==1">-</span>
									<input class="inputset" :class="{'isfrontshow':item.isfront,'isdis':iscanedit}" :disabled="iscanedit"  type="text"  v-model='item.upperBrokerageTraffic' @focus="focusselect($event)" @change='getchange_num($event,index,"upperBrokerageTraffic",item.brokerageBusinessType)'/>
									
									<span v-if="item.brokerageBusinessType==0" class="Percentage_color">%</span>
									<span  class="Percentage_color" v-else>元</span>
								</span>
								<span class="tablescontcen_input" :class="item.change2?'ischange2':''">
									<span v-if="item.chargeType==1">-</span>
									<input :class="{'isfrontshow':item.isfront,'isdis':iscanedit}" :disabled="iscanedit" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperRewardTraffic' @change='getchange_num($event,index,"upperRewardTraffic",item.brokerageBusinessType)'/>
									
									<span v-if="item.brokerageBusinessType==0"  class="Percentage_color">%</span>
									<span v-else  class="Percentage_color">元</span>
									</span>
							</span>
						<span class="tablescont_cen_float">
								<span class="tablescontcen_input" :class="item.change3?'ischange3':''">
									<span v-if="item.chargeType==1">-</span>
									<input :class="{'isseconshow':item.issecon,'isdis':iscanedit}" :disabled="iscanedit" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperBrokerageBusiness' @change='getchange_num($event,index,"upperBrokerageBusiness",item.brokerageBusinessType)'/>
									
									<span v-if="item.brokerageBusinessType==0"  class="Percentage_color">%</span>
									<span v-else  class="Percentage_color">元</span>
								</span>
								<span class="tablescontcen_input" :class="item.change4?'ischange4':''">
									<span v-if="item.chargeType==1">-</span>
									<input :class="{'isseconshow':item.issecon,'isdis':iscanedit}" :disabled="iscanedit" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperRewardBusiness' @change='getchange_num($event,index,"upperRewardBusiness",item.brokerageBusinessType)'/>
									
									<span v-if="item.brokerageBusinessType==0"  class="Percentage_color">%</span>
									<span v-else  class="Percentage_color">元</span>
								</span>
							</span>
							
					</div>
					
					</el-popover>
					</template>-->
						<div class="tablescont_cen" :class="item.isbackshow?'backshows':''">
							<span class="cen_top_bor tablescont_cen_float">
								<span class="tablescontcen_input" :class="item.change1?'ischange1':''">
									<span v-if="item.chargeType==1">-</span>
							<input class="inputset" :class="{'isfrontshow':item.isfront,'isdis':iscanedit}" :disabled="iscanedit" type="text" v-model='item.upperBrokerageTraffic' @focus="focusselect($event)" @input='getchange_num($event,index,"upperBrokerageTraffic",item.brokerageBusinessType)' />

							<span v-if="item.brokerageBusinessType==0" class="Percentage_color">%</span>
							<span class="Percentage_color" v-else>元</span>
							</span>
							<span class="tablescontcen_input" :class="item.change2?'ischange2':''">
									<span v-if="item.chargeType==1">-</span>
							<input :class="{'isfrontshow':item.isfront,'isdis':iscanedit}" :disabled="iscanedit" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperRewardTraffic' @input='getchange_num($event,index,"upperRewardTraffic",item.brokerageBusinessType)' />
							<!-- &nbsp; -->
							<span v-if="item.brokerageBusinessType==0" class="Percentage_color">%</span>
							<span v-else class="Percentage_color">元</span>
							</span>
							</span>
							<span class="tablescont_cen_float cen_top_bor">
								<span class="tablescontcen_input" :class="item.change3?'ischange3':''">
									<span v-if="item.chargeType==1">-</span>
							<input :class="{'isseconshow':item.issecon,'isdis':iscanedit}" :disabled="iscanedit" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperBrokerageBusiness' @input='getchange_num($event,index,"upperBrokerageBusiness",item.brokerageBusinessType)' />
							<!-- &nbsp; -->
							<span v-if="item.brokerageBusinessType==0" class="Percentage_color">%</span>
							<span v-else class="Percentage_color">元</span>
							</span>
							<span class="tablescontcen_input" :class="item.change4?'ischange4':''">
									<span v-if="item.chargeType==1">-</span>
							<input :class="{'isseconshow':item.issecon,'isdis':iscanedit}" :disabled="iscanedit" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperRewardBusiness' @input='getchange_num($event,index,"upperRewardBusiness",item.brokerageBusinessType)' />
							<!-- &nbsp; -->
							<span v-if="item.brokerageBusinessType==0" class="Percentage_color">%</span>
							<span v-else class="Percentage_color">元</span>
							</span>
							</span>
							<span class="tablescont_cen_float tablescont_cen_che">
								<span class="tablescontcen_input" :class="item.change5?'ischange5':''">
									<span v-if="item.chargeType==1">-</span>
							<input :disabled="iscanedit" :class="{'isdis':iscanedit}" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperBrokerageVehicleTax' @input='getchange_num($event,index,"upperBrokerageVehicleTax",item.brokerageBusinessType)' />
							<span v-if="item.brokerageBusinessType==0" class="Percentage_color">%</span>
							<span v-else class="Percentage_color">元</span>
							</span>

							</span>
							<div class="poper_operation">
								<span type="text" @click="subfalse(index)">取消</span>
								<span type="text" @click="subpolicy(item,index)">保存</span>
							</div>
						</div>

						<!--<template v-else>
						 <div class="tablescont_cen" :class="item.isbackshow?'backshows':''" slot="reference">
						<span class="cen_top_bor tablescont_cen_float">
								<span class="tablescontcen_input" :class="item.change1?'ischange1':''">
									<span v-if="item.chargeType==1">-</span>
									<input :class="item.isfront?'isfrontshow':''" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperBrokerageTraffic' @change='getchange_num($event,index,"upperBrokerageTraffic",item.brokerageBusinessType)'/>
									&nbsp;
									<span v-if="item.brokerageBusinessType==0" class="Percentage_color">%</span>
									<span  class="Percentage_color" v-else>元</span>
								</span>
								<span class="tablescontcen_input" :class="item.change2?'ischange2':''">
									<span v-if="item.chargeType==1">-</span>
									<input :class="item.isfront?'isfrontshow':''" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperRewardTraffic' @change='getchange_num($event,index,"upperRewardTraffic",item.brokerageBusinessType)'/>
									&nbsp;
									<span v-if="item.brokerageBusinessType==0"  class="Percentage_color">%</span>
									<span v-else  class="Percentage_color">元</span>
									</span>
							</span>
						<span class="tablescont_cen_float">
								<span class="tablescontcen_input" :class="item.change3?'ischange3':''">
									<span v-if="item.chargeType==1">-</span>
									<input :class="item.issecon?'isseconshow':''" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperBrokerageBusiness' @change='getchange_num($event,index,"upperBrokerageBusiness",item.brokerageBusinessType)'/>
									&nbsp;
									<span v-if="item.brokerageBusinessType==0"  class="Percentage_color">%</span>
									<span v-else  class="Percentage_color">元</span>
								</span>
								<span class="tablescontcen_input" :class="item.change4?'ischange4':''">
									<span v-if="item.chargeType==1">-</span>
									<input :class="item.issecon?'isseconshow':''" @focus="focusselect($event)" type="text" class="inputset" v-model='item.upperRewardBusiness' @change='getchange_num($event,index,"upperRewardBusiness",item.brokerageBusinessType)'/>
									&nbsp;
									<span v-if="item.brokerageBusinessType==0"  class="Percentage_color">%</span>
									<span v-else  class="Percentage_color">元</span>
								</span>
							</span>
							
					</div>
					
					</template>
					-->
						<div class="tablescont_right">
							<template v-if="info.state==0||info.state==5">
								<a @click='toDetail(item.policyId)'>编辑</a>
								<a @click="tocopy(item.policyId)" class="tablescont_right_edit">复制</a>
								<el-popover placement="bottom-start" width="250" v-model="item.isdelete">
									<p class="candeletes">确定删除吗？</p>
									<div style="text-align: right; margin: 0">
										<el-button size="mini" type="info" @click="isdeletefalse">取消</el-button>
										<el-button size="mini" @click="deletepolicy(item.policyId,index)" :loading="loading7">确定</el-button>
									</div>
									<span slot="reference" class="tablescont_right_delete" ref="tanindexs">删除</span>
								</el-popover>

							</template>
							<template v-else>
								<a @click='toDetails(item.policyId)'>详情</a>
							</template>

						</div>
						<div style="clear:both">

						</div>
						<div class="shoedetails" v-loading="item.loadings" v-if="item.detailshow">
							<template v-if="item.showdetails">
								<div class="detail_left">
									<div style="display:flex;width: 92%;margin-top:24px;">
										<p class="detailname" v-show="item.isFalse">车辆种类:</p>
										<div class="detailCon">
											<div class="detailconytent" v-for="val in item.showdetails" v-if="val.filterType==1">
												<p class="spanname"><i class='iconfont icon-lingxing'> </i>{{val.filterName}}:</p>
												<p class="spantext">{{val.filterValue}}</p>
												<div style="clear:both">

												</div>
											</div>
										</div>

									</div>
								</div>
								<div class="detail_right">
									<div style="display:flex;width: 92%;margin-top:18px;margin-bottom: 24px;">
										<p class="detailname" v-show="item.isFalse2">保单信息:</p>
										<div class="detailCon">
											<div class="detailconytent" v-for="val in item.showdetails" v-if="val.filterType==2">
												<p class="spanname" v-if="val.filterName == '投放区域'"><i class='iconfont icon-lingxing'> </i>投放区域:</p>
												<p class="spanname" v-else-if="val.filterName == '不包含险种'"><i class='iconfont icon-lingxing'> </i>不包含险种:</p>
												<p class="spanname" style="width:108px;" v-else-if="val.filterName == '出险次数规则'"><i class='iconfont icon-lingxing'> </i>出险次数规则:</p>
												<p class="spanname" v-else><i class='iconfont icon-lingxing'> </i>{{val.filterName}}:</p>
												<p class="spantext" v-if="val.filterName == '投放区域'">
													<span style="    display: block;" v-for="quyu in val.regions">

                                     <el-popover
                                  placement="top-start"
                                  :title="quyu.typeName"
      
                                  trigger="hover">

                                  <div class="diqu">{{quyu.regionName}}</div>
                                  <span slot="reference">{{quyu.typeName}}</span>
													</el-popover>
													</span>
												</p>
												<p class="spantext" v-else>{{val.filterValue}}</p>
												<div style="clear:both">

												</div>
											</div>
										</div>
									</div>
								</div>

								<div style="clear:both;">

								</div>
							</template>
							<template v-else>
								<div class="nodata">
									暂无数据
								</div>
							</template>
						</div>

					</div>
					<div class="tables_bom" v-if="info.state==0||info.state==5">
						<div class="tables_bom_left">
							<span @click="toEdit()">
								<i class="iconfont icon-plus"></i>
								<span >新建政策</span>
							</span>

						</div>
						<div class="tables_bom_cen">
							<span :class="this.moresave?'':'havemaoe'" @click="moresaves">批量保存</span>
						</div>
						<div class="tables_bom_right">

						</div>
					</div>
				</div>

			</div>
			<div class="p-btn">
				<!--<el-button size='mini' class='wd100 setborder' @click='toUp()'>上一步</el-button>
				<el-button size='mini' type='primary' class='wd100' @click='toNext()'>下一步</el-button>-->
				<el-button size='mini' v-if="info.state==0||info.state==5" :disabled="rovalDisa" class='wd100 setborder' @click="toexamine" :loading="loading3">{{rovalHtml}}</el-button>
				<el-button size='mini' v-if="info.state==0||info.state==5" class='wd100 setborder' @click="deletebatch" :loading="loading4">删除</el-button>
				<el-button size='mini' v-if="(info.state!==0 && info.state!==5)&&this.Jurisdiction==1" class='wd100 setborder' @click="Applicationeditor" :loading="loading5">申请编辑</el-button>
				<el-button size='mini' v-if="info.state==2||info.state==3||info.state==4" class='wd100s setborder' @click="generate">生成下游政策</el-button>
				<!--<el-button :loading="loading" size='mini' v-if="info.state==1&&this.Jurisdiction==2" class='wd100 setborder' @click="adopt">通过</el-button>
				<el-button size='mini' v-if="info.state==1&&this.Jurisdiction==2" class='wd100 setborder' @click="reject" :loading="loading6">驳回</el-button>-->
				<div class="adoptorreject" v-if="info.state==1&&this.Jurisdiction==2">
					<p class="adoptdis">审核结果及说明</p>
					<div class="adoptresult">
						<p>审核结果：</p>
						<div id="">
							<el-radio v-model="radios" label="1">通过</el-radio>
							<el-radio v-model="radios" label="2">驳回</el-radio>
						</div>
					</div>
					<div class="adoptresult">
						<p>说&emsp;&emsp;明：</p>
						<div class="adoptresultbom">
							<el-input class="reason_wid" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入内容" v-model="dismissalSeason">
							</el-input>
						</div>
					</div>
					<div style="clear:both">

					</div>
					<el-button size='mini' class='setborder adoptsub' @click="isaddport" :loading="loading6">提交</el-button>
				</div>
			</div>
		</div>
		<el-dialog title="提示" :visible.sync="dialogTableVisible" width="750px" class="toDis-dialog upper4-dialog" :close-on-click-modal="false">
			<p class="dialog-tit">
				{{nowmessage}}
				<!-- 当前批次“<span class="toblue">{{info.batchName}}</span>”与以下政策批次有效时间重叠，点击“确定”，系统将自动修改重叠批次的截止时间为当前批次的开始时间 {{info.effectiveDate}} -->
			</p>
			<div class="dialog-max">
				<div class="visi-wrp">
					<div class="visi-list">
						<div class="list_name">
							批次名称
						</div>
						<div class="list_time">
							有效时间
						</div>
						<template v-for="(item,index) in existence">
							<div class="list_name">
								{{item.batchName}}
							</div>
							<div class="list_time">
								{{item.effectiveDate}} -
								<span v-if="item.expiryDate">{{item.expiryDate}}</span>
								<span v-else>不限</span>
							</div>
						</template>
					</div>
				</div>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button class="upper4-sureBtn" @click="goEdit" size="small" style="min-width:70px;">取消</el-button>
				<el-button class="upper4-sureBtn" type="primary" @click="toRoval_sure()" size="small" style="min-width:70px;">确定</el-button>
			</div>
		</el-dialog>
		<!--有冲突不提交-->
		<el-dialog title="提示" :visible.sync="candialogTableVisible" width="750px" class="toDis-dialog upper4-dialog" :close-on-click-modal="false">
			<p class="dialog-tit">
				{{nowmessage}}
			</p>
			<div class="dialog-max">
				<div class="visi-wrp">
					<div class="visi-list">
						<div class="list_name">
							批次名称
						</div>
						<div class="list_time">
							有效时间
						</div>
						<template v-for="(item,index) in existence">
							<div class="list_name">
								{{item.batchName}}
							</div>
							<div class="list_time">
								{{item.effectiveDate}} -
								<span v-if="item.expiryDate">{{item.expiryDate}}</span>
								<span v-else>不限</span>
							</div>
						</template>
					</div>
				</div>
			</div>
			<div slot="footer" class="dialog-footer">
				<!-- <el-button class="upper4-sureBtn" @click="candialogTableVisible=false" size="small" style="min-width:70px;">取消</el-button> -->
				<el-button class="upper4-sureBtn" type="primary" @click="candialogTableVisible=false" size="small" style="min-width:70px;">关闭</el-button>
			</div>
		</el-dialog>

		<el-dialog title="审核提示" :visible.sync="ex_dialogTableVisible" width="500px" class="toDis-dialog upper4-dialog" :close-on-click-modal="false">
			<p class="dialog-tit">
				当前批次“
				<span class="toblue">{{info.batchName}}</span>”与以下政策批次有效时间重叠，审核通过后,系统会自动将当前批次（{{info.batchName}}）的开始时间修改为重叠批次的截止时间 {{info.effectiveDate}}
			</p>
			<div class="dialog-max">
				<div class="visi-wrp" v-for="(item,index) in existence">
					<!--<div class="visi-wrp">-->
					<div class="visi-list">
						<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;批次名称：{{item.batchName}}</div>
						<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;有效时间：{{item.effectiveDate}} -
							<span v-if="item.expiryDate">{{item.expiryDate}}</span>
							<span v-else>不限</span>
						</div>
					</div>
				</div>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button class="upper4-sureBtn" @click="ex_goEdit" size="small" style="min-width:70px;">取消</el-button>
				<el-button class="upper4-sureBtn" type="primary" @click="ex_toRoval_sure()" size="small" style="min-width:70px;">确定</el-button>
			</div>
		</el-dialog>

		<el-dialog title="驳回原因" :visible.sync="Rejectshow" width="690px" class="toDis-dialog2" :close-on-click-modal="false">
			<el-form :model="ruleForm" :rules="rule" ref="ruleForm" label-width="100px" class="demo-ruleForm">
				<el-row :gutter="20">
					<el-form-item label="" prop="dismissalSeason">
						<el-input class="toDis-textarea" type="textarea" rows="12" placeholder="请输入驳回原因" v-model="ruleForm.dismissalSeason"></el-input>
					</el-form-item>
				</el-row>
				<el-form-item class="dialog-sec-wp">
					<div class="btncenters">
						<el-button size="small" type="primary" class="toDis-toRoval-btn btncenter" @click="toDis_sure('ruleForm')">确 定</el-button>
					</div>

				</el-form-item>
			</el-form>
		</el-dialog>

	</div>
</template>
<script>
	import Vue from "vue";
	import nextnav from "./assembly/nextnav";
	import datachange from "@/components/datachange/datachange";
	export default {
		data() {
			return {
				visible2: false,
				isdelete: false,
				indexs: null,
				radios: "1",
				dismissalSeason: "",
				indexs_tow: null,
				moresave: false,
				id: "", //当前id
				policylist: [],
				copypolicylist: [],
				info: {},
				copyinfo: {
					staffId: []
				},
				navnum: 2,
				insuranceId: "",
				isshow: false,
				rules: {
					batchName: [{
						required: true,
						message: "请输入批次名称",
						trigger: "blur"
					}],
					insuranceId: [{
						required: true,
						message: "请选择保险公司",
						trigger: "change"
					}],
					staffId: [{
						required: true,
						message: "请选择适用工号",
						trigger: "change"
					}],
					effectiveDate: [{
						required: true,
						message: "请选择开始时间",
						trigger: "change"
					}]
				},

				workoptions: [],
				options: [],
				policyBatchType: 0, //上游  批次类型
				existence: [],
				rovalHtml: "提交审核",
				rovalDisa: false,
				dialogTableVisible: false,
				ex_dialogTableVisible: false,
				Rejectshow: false,
				ruleForm: {
					dismissalSeason: null
				},
				rule: {
					dismissalSeason: [{
						required: true,
						message: "请输入驳回原因",
						trigger: "blur"
					}]
				},
				islimit: false,
				endDateOpt: this.enddate(),
				startDateOpt: this.startdate(),
				additional: {},
				status: "",
				Jurisdiction: "",
				loading: false,
				loading1: false,
				loading2: false,
				loading3: false,
				loading4: false,
				loading5: false,
				loading6: false,
				loading7: false,
				showdetails: [],
				iscanedit: false,
				errormsg: {
					beginerror: false,
					enderror: false,
					message: ""
				},
				unli: true,
				isFalse: true,
				isFalse2: true,
				candialogTableVisible: false,
				nowmessage: "",
				newid: "",
				isbacktrue:null,
				matchInfo:[],
				shua:false,
				snumbers:[],
				numIndex:null
			};
		},
		mounted() {
			var that = this
			setTimeout(function() {
				console.log(11111111111111111)

				if(that.$refs.tanindexs) {
					that.$refs.tanindexs.map((val, index) => {
						that.$refs.tanindexs[index].setAttribute("tabindex", "-1")
					})
				}
			}, 1000)

			//this.$refs.tanindexs.setAttribute('tanindexs',-1)
			this.Jurisdiction = this.$route.query.Jurisdiction;
			if(this.$route.query.isback){
				this.isbacktrue=this.$route.query.isback
			}
			this.id = this.$route.query.batchId;
			this.getBasic();
			this.getPolicyList();
			this.getPi()
		},
		filters: {
			changeNumber(val) {
				if(val < 10) {
					return "0" + val;
				} else {
					return val;
				}
			}
		},
		components: {
			nextnav,
			datachange
		},

		methods: {
			getPi(type){
				this.shua = true
				console.log(this.shua)
				let params ={
					id :this.id
				}
				this.post(params, "	services/app/policy/PolicyMatchInfo").then(re => {
						if(re.success) {
							this.shua = false
							console.log(re)
							this.matchInfo = re .result
							//  if(type){
							// 	 this.$message({
							// 		message: '刷新成功',
							// 		type: 'success'
							// 		});
							// }
						}else{
							this.shua = false
						}
					});
			
			},
			inf(val) {
				this.unli = val
			},
			//复制
			iscopy(val) {
				let params = {
					id: val
				};
				var txt = "确定复制吗？";
				this.$confirm(txt, "审核提示", {
					confirmButtonText: "确定",
					cancelButtonText: "取消",
					closeOnClickModal: false
					// type: 'warning'
				}).then(() => {
					this.post(params, "services/app/policy/CopyUpperPolicy").then(re => {
						if(re.success) {
							this.getPolicyList();
						} else {
							this.failNot(re.error.message);
						}
					});
				});
			},
			//返回
			backs() {
				this.$router.go(-1);
			},
			//验证输入
			clearNoNum(obj, name, maxnum) {
				if(name) {
					this.additional[name] = this.api.clearNoNum_target(
						obj,
						maxnum,
						this.additional.brokerageBusinessType
					);
				}
			},
			//查看冲突
			isconflict() {
				console.log(this.copyinfo);
				let IsReward = this.copyinfo.isReward ? 1 : 0;
				let params = {
					staffs: this.copyinfo.staffId,
					effectiveDate: this.copyinfo.effectiveDate,
					expiryDate: this.copyinfo.expiryDate,
					isUpperBatch: 0,
					IsReward: IsReward,
					PolicyBatchId: this.id
				};
				this.post(
					params,
					"services/app/policy/CheckEffectivedCreatePolicyBatchNew"
				).then(res => {
					if(res.success) {
						console.log("chongtu");
						console.log(res);
							if(res.result.code == 0) {
							//无冲突
							this.nowsubmits()
						} else if(res.result.code == -1 || res.result.code == -2) {
							//有冲突 不能提交
							this.candialogTableVisible = true
							this.nowmessage = res.result.message
							this.existence = res.result.items

						} else {
							//有冲突 解决冲突
							this.dialogTableVisible = true
							this.nowmessage = res.result.message
							this.existence = res.result.items
							this.newid = res.result.id
						}
					} else {
						this.$notify.error({
							title: "错误",
							message: res.error.message
						});
					}
				});
			},
			//编辑基本嘻嘻
			btn(formName) {
				var stringTime1 = this.copyinfo.effectiveDate;
				var stringTime2 = this.copyinfo.expiryDate;
				var timestamp1 = Date.parse(new Date(stringTime1));
				var timestamp2 = Date.parse(new Date(stringTime2));

				this.copyinfo.id = this.id;
				this.$refs[formName].validate(valid => {
					if(valid) {
						if(this.copyinfo.expiryDate) {
							if(timestamp1 <= timestamp2) {
								//this.nowsubmits()
								this.errormsg = {
									beginerror: false,
									enderror: false,
									message: ""
								};
								//查看冲突
								this.isconflict();
								//不查看冲突
								// this.nowsubmits()
							} else {
								this.errormsg = {
									beginerror: true,
									enderror: true,
									message: "开始时间不能大于结束时间"
								};
							}
						} else {
							this.errormsg = {
								beginerror: false,
								enderror: false,
								message: ""
							};
							//查看冲突
							this.isconflict();
							//不查看冲突
							//this.nowsubmits()
						}
					} else {
						return false;
					}
				});
			},
			//编辑提交
			nowsubmits() {
				this.loading1 = true;
				let params = this.copyinfo;
				this.post(params, "services/app/policy/CreateUpperPolicyBatch").then(
					res => {
						if(res.success) {
							this.loading1 = false;

							this.getBasic();
							this.isshow = false;
						} else {
							this.loading1 = false;
							this.$notify.error({
								title: "错误",
								message: res.error.message
							});
						}
					}
				);
			},
			//开始时间
			startdate() {
				var that = this;
				return {
					disabledDate(time) {
						if(that.copyinfo.expiryDate) {
							return time.getTime() > that.copyinfo.expiryDate;
						} else {
							return that.copyinfo.expiryDate;
						}
					}
				};
			},
			//结束时间
			enddate() {
				var that = this;
				return {
					disabledDate(time) {
						return time.getTime() < that.copyinfo.effectiveDate;
					}
				};
			},
			//去修改
			goEdit() {
				this.dialogTableVisible = false;
			},
			ex_goEdit() {
				this.ex_dialogTableVisible = false;
			},
			//更新状态
			toupdate() {
				let IsReward = this.copyinfo.isReward ? 1 : 0;
				let params = {
					id: this.newid
//					staffs: this.copyinfo.staffId,
//					effectiveDate: this.copyinfo.effectiveDate,
//					expiryDate: this.copyinfo.expiryDate,
//					isUpperBatch: 0,
//					IsReward: IsReward
				};
				this.post(
					params,
					"services/app/policy/UpdateExpiryDateCreatePolicyBatchNew"
				).then(res => {
					if(res.success) {
						console.log("更新成功");
					} else {
						this.$notify.error({
							title: "错误",
							message: res.error.message
						});
					}
				});
			},
			//继续提交
			toRoval_sure() {
				this.dialogTableVisible = false;
				this.nowsubmits();
				this.toupdate();
				//this.toRovalPost();
				//this.Updatestate()
			},
			ex_toRoval_sure() {
				this.ex_dialogTableVisible = false;
				this.adpass();
				this.Updatestate();
			},
			//更新状态
			Updatestate(val) {
				let str = "";
				for(let i = 0; i < this.existence.length; i++) {
					if(i == this.existence.length - 1) {
						str += this.existence[i].policyBatchId;
					} else {
						str += this.existence[i].policyBatchId + ",";
					}
				}
				let params = {
					policyBatchId: this.id
				};

				this.post(params, "services/app/policy/UpdateExpiryDate").then(re => {
					if(re.success) {} else {
						this.failNot(re.error.message);
					}
				});
			},
			//申请编辑
			Applicationeditor() {
				//policyBatchId
				let params = {
					policyBatchId: this.id
				};
				var txt = "确定申请编辑吗？";
				this.$confirm(txt, "审核提示", {
					confirmButtonText: "确定",
					cancelButtonText: "取消",
					closeOnClickModal: false
					// type: 'warning'
				}).then(() => {
					this.loading5 = true;
					this.post(
						params,
						"services/app/policy/UpdatePolicyBatchStateToEditing"
					).then(re => {
						if(re.success) {
							this.loading5 = false;

							this.$notify({
								title: "提交成功",
								message: "您已成功申请编辑",
								type: "success",
								customClass: "el-notification-success"
							});
							if(this.isbacktrue){
								this.$router.push({
									name: "policyup"
								});
							}else{
								this.$router.go(-1)
							}
							
						} else {
							this.loading5 = false;
							this.failNot(re.error.message);
						}
					});
				});
			},
			//删除批次
			deletebatch() {
				let params = {
					id: this.id
				};
				var txt = "此操作将永久删除该政策批次, 是否继续?";
				this.$confirm(txt, "提示", {
					confirmButtonText: "确定",
					cancelButtonText: "取消",
					closeOnClickModal: false
					// type: 'warning'
				}).then(() => {
					this.loading4 = true;
					this.post(params, "services/app/policy/DeletePolicyBatch").then(re => {
						if(re.success) {
							this.loading4 = false;

							this.$notify({
								title: "删除成功",
								message: "您已成功删除一条上游批次",
								type: "success",
								customClass: "el-notification-success"
							});
							if(this.isbacktrue){
								this.$router.push({
									name: "policyup"
								});
							}else{
								this.$router.go(-1)
							}
						} else {
							this.loading4 = false;
							this.failNot(re.error.message);
						}
					});
				});
			},
			//通过活驳回
			isaddport() {
				if(this.radios == 1) {
					this.adopt();
				} else {
					this.toDis_sure();
				}
			},
			//通过
			adopt() {
				//if(this.existence.length == 0){
				//无冲突
				var txt = "确定通过审核吗？";
				this.$confirm(txt, "审核提示", {
					confirmButtonText: "确定",
					cancelButtonText: "取消",
					closeOnClickModal: false
					// type: 'warning'
				}).then(() => {
					this.adpass();
				});

				//				}else{
				//					//有冲突
				//					this.ex_dialogTableVisible=true
				//				}
			},
			//通过2
			adpass() {
				this.loading6 = true;
				let params = {
					policyBatchId: this.id
				};
				this.post(
					params,
					"services/app/policy/UpdatePolicyBatchStateToApproval"
				).then(re => {
					if(re.success) {
						// this.$notify({
						// 	title: "审核成功",
						// 	message: "您已成功审核通过一条上游批次",
						// 	type: "success",
						// 	customClass: "el-notification-success"
						// });
						this.loading6 = false;
						var txt = "审核成功，系统将重新计算对应保单的政策。";
						this.$alert(txt, "成功", {
						confirmButtonText: "确定",
						closeOnClickModal: false,
						showClose:false
						// type: 'warning'
						}).then(() => {
						if(this.isbacktrue){
							this.$router.push({
									name: "policyup"
								});
							}else{
								this.$router.go(-1)
							}
						});
					} else {
						this.loading6 = false;
						this.failNot(re.error.message);
					}
				});
			},
			//驳回
			reject() {
				this.Rejectshow = true;
				Vue.set(this.ruleForm, "dismissalSeason", "");
			},
			//生成下游政策
			generate() {
				let params = {
					id: this.id
				};
				var txt = "确定生成下游政策吗？";
				this.$confirm(txt, "审核提示", {
					confirmButtonText: "确定",
					cancelButtonText: "取消",
					closeOnClickModal: false
					// type: 'warning'
				}).then(() => {
					//      this.post(
					//        params,
					//        "services/app/policy/CreatePolicyBatchFormUpper"
					//      ).then(re => {
					//        if (re.success) {
					//          this.$router.push({
					//            name: "policydownnew",
					//            query: {
					//              id: this.id
					//            }
					//          });
					//        } else {
					//          this.failNot(re.error.message);
					//        }
					//      });
					this.$router.push({
						name: "policydownnew",
						query: {
							id: this.id
						}
					});
				});
			},
			toDis_sure() {
				if(this.dismissalSeason == "") {
					this.$message({
						message: "驳回原因不能为空",
						type: "warning"
					});
					return false;
				}
				this.loading6 = true;
				let params = {
					policyBatchId: this.id,
					dismissalSeason: this.dismissalSeason
				};
				this.post(
					params,
					"services/app/policy/UpdatePolicyBatchStateToDismissal"
				).then(res => {
					if(res.success) {
						this.loading6 = false;
						//							this.$notify({
						//	                         title: '成功',
						//	                         message: '已驳回',
						//	                         type: 'success'
						//	                        });

						if(this.isbacktrue){
								this.$router.push({
									name: "policyup"
								});
							}else{
								this.$router.go(-1)
							}
						this.Rejectshow = false;
					} else {
						this.loading6 = false;
						this.failNot(res.error.message);
					}
				});
			},
			//提交审核
			toexamine() {
				//	if(this.existence.length == 0){
				//无冲突
				if(this.moresave){
					this.$confirm("你有未保存数据，确认提交审核吗", "审核提示", {
							confirmButtonText: "确定",
							cancelButtonText: "取消",
							closeOnClickModal: false
							// type: 'warning'
						}).then(() => {
							this.toRovalPost();
						}).catch(()=>{
							
							 //this.indexActive=null
						})
				}else{
					var txt = "确定提交审核吗？";
					this.$confirm(txt, "审核提示", {
						confirmButtonText: "确定",
						cancelButtonText: "取消",
						closeOnClickModal: false
						// type: 'warning'
					}).then(() => {
						this.toRovalPost();
					});
				}
				

				//				}else{
				//					//有冲突
				//					this.dialogTableVisible=true
				//				}
			},
			//无冲突提交
			toRovalPost() {
				let params = {
					policyBatchId: this.id
				};
				this.loading3 = true;
				this.post(
					params,
					"services/app/policy/UpdatePolicyBatchStateToApprovalPending"
				).then(re => {
					if(re.success) {
						this.loading3 = false;
						this.rovalHtml = "已提交";
						this.rovalDisa = true;
						this.$notify({
							title: "提交成功",
							message: "您已成功提交审核",
							type: "success",
							customClass: "el-notification-success"
						});
						if(this.isbacktrue){
								this.$router.push({
									name: "policyup"
								});
							}else{
								this.$router.go(-1)
							}
					} else {
						this.loading3 = false;
						this.failNot(re.error.message);
					}
				});
			},
			//保存成功提示
			successNot() {
				this.$notify({
					title: "提交成功",
					message: "您已成功提交一条上游批次",
					type: "success",
					customClass: "el-notification-success"
				});
			},
			//保存失败提示
			failNot(message) {
				this.$notify.error({
					title: "保存失败",
					message: message,
					duration: 0,
					customClass: "el-notification-error"
				});
			},
			//更改公司
			changecomony(val) {
				//this.copyinfo.staffId=[]

				//this.info.insuranceId=val
				Vue.set(this.copyinfo, "insuranceId", val);
				let arr = [];
				Vue.set(this.copyinfo, "staffId", arr);

				this.getWorknumber();
			},
			//获取工号
			getWorknumber() {
				let params = {
					id: this.copyinfo.insuranceId
				};
				//Vue.set(this.copyinfo,"staffId",[])
				this.post(params, "services/app/common/GetCurrentInsuranceStaffs").then(
					res => {
						var arr = [];
						//this.workoptions
						arr = res.result.items;
						for(var i = 0; i < arr.length; i++) {
							if(arr[i].describe != "") {
								arr[i].staffAccount =
									arr[i].staffAccount + " (" + arr[i].describe + ")";
							} else {
								arr[i].staffAccount = arr[i].staffAccount;
							}
						}
						this.workoptions = arr;
					}
				);
			},
			//获取公司列表
			getcommoy() {
				let params = {};
				this.post(params, "services/app/common/GetGroupInsurances").then(res => {
					this.options = res.result.items;
				});
			},
			//编辑批次信息
			batchedit() {
				let str = JSON.stringify(this.info);
				this.copyinfo = JSON.parse(str);
				let arr = [];

				for(let i = 0; i < this.copyinfo.staffNames.length; i++) {
					arr.push(this.copyinfo.staffNames[i].staffId);
				}
				Vue.set(this.copyinfo, "staffId", arr);

				this.isshow = true;
			},
			//信息
			getBasic() {
				let params = {
					id: this.id
				};
				this.post(params, "services/app/policy/GetPolicyBatchBasic").then(rs => {
					if(rs.success) {
						console.log("--------------------");
						console.log(rs);
						this.info = rs.result;
						let str = JSON.stringify(this.info);
						this.copyinfo = JSON.parse(str);
						this.status = rs.result.state;
						this.insuranceId = rs.result.insuranceId;
						if(this.info.state == 0 || this.info.state == 5) {
							this.iscanedit = false;
						} else {
							this.iscanedit = true;
						}
						if(this.info.expiryDate) {
							//islimit

							this.islimit = false;
						} else {
							this.islimit = true;
						}

						this.getcommoy();
						this.getWorknumber();
					} else {
						this.$notify.error({
							title: "错误",
							message: res.error.message
						});
					}
				});
				this.post(params, "services/app/policy/CheckEffectivedPolicyBatch").then(
					res => {
						if(res.success) {
							this.existence = res.result.items;
						} else {
							this.$notify.error({
								title: "错误",
								message: res.error.message
							});
						}
					}
				);
			},
			//编辑展示
			editshow(val, e) {
				this.isdeletefalse();
				let str = JSON.stringify(val);
				this.additional = JSON.parse(str);
				var arr = [];
				for(let i = 0; i < this.policylist.length; i++) {
					arr.push(this.policylist[i]);
					if(e == i) {
						arr[i].iseditshow = true;
					} else {
						arr[i].iseditshow = false;
					}
				}
				this.policylist = arr;
			},
			//取消编辑
			edithide() {
				var arr = [];
				for(let i = 0; i < this.policylist.length; i++) {
					arr.push(this.policylist[i]);
					arr[i].iseditshow = false;
				}
				this.policylist = arr;
			},
			isdeletetrue(val, e) {
				this.edithide();

				var arr = [];
				for(let i = 0; i < this.policylist.length; i++) {
					arr.push(this.policylist[i]);
					if(e == i) {
						arr[i].isdelete = true;
					} else {
						arr[i].isdelete = false;
					}
				}
				this.policylist = arr;
			},
			isdeletefalse() {
				var arr = [];
				for(let i = 0; i < this.policylist.length; i++) {
					arr.push(this.policylist[i]);
					arr[i].isdelete = false;
				}
				this.policylist = arr;
			},
			//取消
			subfalse(index) {
				console.log(index);
				console.log(this.copypolicylist[index]);
				let str = JSON.stringify(this.copypolicylist[index]);
				Vue.set(this.policylist, index, JSON.parse(str));
				var aa = false;
				this.policylist.map(item => {
					if(item.isbackshow) {
						aa = true;
					}
				});
				this.moresave = aa;
			},
			//批量保顿
			moresaves() {
				if(this.moresave) {
					let arr = [];
					let aa = false;
					this.policylist.map(item => {
						if(item.isbackshow) {
							arr.push(item);
						}
						if(item.isfront || item.issecon) {
							aa = true;
						}
					});
					if(aa == true) {
						this.$message({
							message: "数据不对",
							type: "warning"
						});
					} else {
						var txt = "确定批量保存吗？";
						this.$confirm(txt, "保存提示", {
							confirmButtonText: "确定",
							cancelButtonText: "取消",
							closeOnClickModal: false
							// type: 'warning'
						}).then(() => {
							let params = {
								items: arr
							};
							this.post(
								params,
								"services/app/policy/UpdateUpperPolicyCustom"
							).then(rs => {
								if(rs.success) {
									this.$notify({
										title: "修改成功",
										message: "您已修改成功",
										type: "success",
										customClass: "el-notification-success"
									});
									this.getPolicyList();
									this.moresave = false;
								} else {
									this.$notify.error({
										title: "错误",
										message: res.error.message
									});
								}
							});
						});
					}
				}
			},
			//修改单挑政策数据
			subpolicy(item, index) {
				let obj = {
					policyId: item.policyId,
					upperBrokerageBusiness: item.upperBrokerageBusiness,
					upperRewardBusiness: item.upperRewardBusiness,
					upperBrokerageTraffic: item.upperBrokerageTraffic,
					upperRewardTraffic: item.upperRewardTraffic,
					upperBrokerageVehicleTax: item.upperBrokerageVehicleTax,
					upperRewardVehicleTax: ""
				};
				if(item.isfront || item.issecon) {
					this.$message({
						message: "数据不对",
						type: "warning"
					});
				} else {
					this.loading2 = true;
					let arr = [];
					arr.push(obj);
					let params = {
						items: arr
					};
					this.post(params, "services/app/policy/UpdateUpperPolicyCustom").then(
						rs => {
							if(rs.success) {
								this.loading2 = false;
								this.$notify({
									title: "修改成功",
									message: "您已修改成功",
									type: "success",
									customClass: "el-notification-success"
								});
								//this.getPolicyList()
								//copypolicylist

								Vue.set(this.policylist[index], "isbackshow", false);
								Vue.set(this.policylist[index], "change1", false);
								Vue.set(this.policylist[index], "change2", false);
								Vue.set(this.policylist[index], "change3", false);
								Vue.set(this.policylist[index], "change4", false);
								Vue.set(this.policylist[index], "change5", false);
								let str = JSON.stringify(this.policylist[index]);
								Vue.set(this.copypolicylist, index, JSON.parse(str));
								//this.copypolicylist[index]=this.policylist[index]
								let aa = false;
								this.policylist.map(item => {
									if(item.isbackshow) {
										aa = true;
									}
								});
								this.moresave = aa;
								//this.edithide()
							} else {
								this.loading2 = false;
								this.$notify.error({
									title: "错误",
									message: res.error.message
								});
							}
						}
					);
				}
			},
			//删除政策
			deletepolicy(val, e) {
				let params = {
					policyId: val
				};
				this.loading7 = true;
				this.post(params, "services/app/policy/DeletePolicy").then(res => {
					if(res.success) {
						this.loading7 = false;
						this.$notify({
							title: "删除成功",
							message: "您已成功删除一条政策",
							type: "success",
							customClass: "el-notification-success"
						});
						this.policylist.splice(e, 1);
					} else {
						this.loading7 = false;
						this.$notify.error({
							title: "错误",
							message: res.error.message
						});
					}
				});
			},
			//展示
			isdetailshow(e, val) {
				console.log(val);
				if(val.detailshow == false) {
					this.getshowdetail(e,val);
					
				}
				this.policylist.map((item, index) => {
					if(index == e) {
						Vue.set(item, "loadings", true);
						Vue.set(item, "detailshow", !item.detailshow);
					} 
//					else {
//						Vue.set(item, "detailshow", false);
//					}
				});
			},
			//获取展开信息
			getshowdetail(e,val) {
				
				let params = {
					batchId: this.id,
					policyItemId: val.policyId
				};
				this.post(params, "services/app/policy/GetPolicyFiltersToExpand").then(
					res => {
						if(res.success) {
							console.log("detail");
							console.log(res);
							//this.showdetails = res.result.items;
						this.policylist.map((item, index) => {
							
							if(index == e) {
								Vue.set(item, "loadings", false);
								Vue.set(item, "isFalse", false);
							Vue.set(item, "isFalse2", false);
								Vue.set(item, "showdetails", res.result.items);
								item.showdetails.map((val)=>{
									if(val.filterType == 1) {
										Vue.set(item, "isFalse", true);
									} 
									if(val.filterType == 2) {
										Vue.set(item, "isFalse2", true);
									} 
								})	
							} 				
						});
							
							//this.showdetailsLen(e);
						} else {
							let arr = [];
							this.policylist.map((item, index) => {
							if(index == e) {
								Vue.set(item, "showdetails", arr);
							} 				
						});
							this.$message({
								type: "warning",
								message: "信息填写错误"
							});
						}
					}
				);
			},
			showdetailsLen(e) {
				//console.log(this.showdetails.length)

				for(let i = 0; i < this.policylist[e].showdetails.length; i++) {
					//  console.log( this.isFalse)
					// console.log(this.showdetails[i].filterType != 1)
					if(this.showdetails[i].filterType == 1) {
						this.isFalse = true
						return;
					} else {
						this.isFalse = false
					}
					//  if(this.showdetails[i].filterType == 2){
					//   this.isFalse2 = true
					//   return;
					// }else{
					//   this.isFalse2 = false
					// }
				}
			},
			//信息表
			getPolicyList() {
				let params = {
					id: this.id
				};
				this.post(params, "services/app/policy/GetPolicyList").then(rs => {
					if(rs.success) {
						let arr = ([] = rs.result.items);
						let re = /^[0-9]+.?[0-9]*/;
						arr.forEach(item => {
							if(item) {
								item.iseditshow = false;
								item.isdelete = false;
								item.isbackshow = false;
								item.isfront = false;
								item.issecon = false;
								item.change1 = false;
								item.change2 = false;
								item.change3 = false;
								item.change4 = false;
								item.change5 = false;
								item.hovershow = false;
								item.detailshow = false;
								item.loadings=true
								for(var i in item) {
									if(re.test(item[i])) {
										//										if(item[i] == 0){
										//											item[i] = '';
										//										}
									}
									//									if(i == 'upperBrokerageTraffic' && item['upperBrokerageTraffic'] == ''){
									//										item['upperBrokerageTraffic'] = '4';
									//									}
									//									if(i == 'upperBrokerageTraffic'){
									//										item[i] = item[i]+'';
									//									}
									//									if(i == 'upperRewardTraffic'){
									//										item[i] = item[i]+'';
									//									}
									//									if(i == 'upperBrokerageBusiness'){
									//										item[i] = item[i]+'';
									//									}
									//									if(i == 'upperRewardBusiness'){
									//										item[i] = item[i]+'';
									//									}
								}
							}
						});
						this.policylist = arr;
						let str = JSON.stringify(this.policylist);
						this.copypolicylist = JSON.parse(str);
						console.log("shujujujuju");
						console.log(this.policylist);
						this.snumbers = [];
						// 次序
						for(let i=0;i<arr.length;i++){
							let obj = {
								label:i+1,
								value:i+1,
								id:arr[i].policyId
							}
							this.snumbers.push(obj);
						}
						console.log(this.snumbers);
					}
				});
			},
			//两位小数
			twoBit(value) {
				if(value) {
					value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
					value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
					value = value
						.replace(".", "$#$")
						.replace(/\./g, "")
						.replace("$#$", ".");
					value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数
					if(value.indexOf(".") < 0 && value != "") {
						//以上已经过滤，此处控制的是如果没有小数点，首位不能为类似于 01、02的金额
						value = parseFloat(value);
					}
					// value = value;
					return value;
				}
			},
			//验证小数
			getTest(item) {
				const that = this;
				// let re = /^[0-9\.]+$/g;
				let re2 = /^\d+(\.\d{1,2})?$/;
				for(let i in item) {
					if(
						i == "upperBrokerageTraffic" ||
						i == "upperRewardTraffic" ||
						i == "upperBrokerageBusiness" ||
						i == "upperRewardBusiness"
					) {
						if(!re2.test(item[i])) {
							Vue.set(item, i, that.twoBit(item[i]));
							this.getchange(item);
							// console.warn(item[i]);
						}
					}
				}
			},
			focusselect(val) {
				val.currentTarget.select();
			},
			getchange_num(val, index, name, types) {
				//val.currentTarget.select()
				console.log(val);
				let aa = this.api.clearNoNum_target(val, 100, types);
				Vue.set(this.policylist[index], name, aa);

				Vue.set(this.policylist[index], "isbackshow", true);
				this.moresave = true;
				let a1 = parseFloat(this.policylist[index].upperBrokerageTraffic);
				let a2 = parseFloat(this.policylist[index].upperRewardTraffic);
				let a3 = parseFloat(this.policylist[index].upperBrokerageBusiness);
				let a4 = parseFloat(this.policylist[index].upperRewardBusiness);
				if(name == "upperBrokerageTraffic") {
					Vue.set(this.policylist[index], "change1", true);
				}
				if(name == "upperRewardTraffic") {
					Vue.set(this.policylist[index], "change2", true);
				}
				if(name == "upperBrokerageBusiness") {
					Vue.set(this.policylist[index], "change3", true);
				}
				if(name == "upperRewardBusiness") { //upperRewardBusiness
					Vue.set(this.policylist[index], "change4", true);
				}
				if(name == "upperBrokerageVehicleTax") {
					Vue.set(this.policylist[index], "change5", true);
				}
				if(types == 0) {
					if(a1 + a2 > 100) {
						Vue.set(this.policylist[index], "isfront", true);
					} else {
						Vue.set(this.policylist[index], "isfront", false);
					}
					if(a3 + a4 > 100) {
						Vue.set(this.policylist[index], "issecon", true);
					} else {
						Vue.set(this.policylist[index], "issecon", false);
					}
				}
			},
			//验证100
			getchange(item) {
				const that = this;
				let re = /^[0-9]+.?[0-9]*/;
				for(var i in item) {
					if(item[i] === "") {
						item[i] = "0";
					}
					if(re.test(item[i])) {
						if(i == "upperBrokerageTraffic") {
							if(Number(item[i]) + Number(item["upperRewardTraffic"]) > 100) {
								Vue.set(item, "traffic", true);
							} else {
								Vue.set(item, "traffic", false);
							}
							if(Number(item[i]) > 100) {
								Vue.set(item, "traffic1", true);
							} else {
								Vue.set(item, "traffic1", false);
							}
						}
						if(i == "upperRewardTraffic") {
							if(Number(item[i]) + Number(item["upperBrokerageTraffic"]) > 100) {
								Vue.set(item, "traffic", true);
							} else {
								Vue.set(item, "traffic", false);
							}
							if(Number(item[i]) > 100) {
								Vue.set(item, "traffic2", true);
							} else {
								Vue.set(item, "traffic2", false);
							}
						}
						if(i == "upperBrokerageBusiness") {
							if(Number(item[i]) + Number(item["upperRewardBusiness"]) > 100) {
								Vue.set(item, "business", true);
							} else {
								Vue.set(item, "business", false);
							}
							if(Number(item[i]) > 100) {
								Vue.set(item, "business1", true);
							} else {
								Vue.set(item, "business1", false);
							}
						}
						if(i == "upperRewardBusiness") {
							if(
								Number(item[i]) + Number(item["upperBrokerageBusiness"]) >
								100
							) {
								Vue.set(item, "business", true);
							} else {
								Vue.set(item, "business", false);
							}
							if(Number(item[i]) > 100) {
								Vue.set(item, "business2", true);
							} else {
								Vue.set(item, "business2", false);
							}
						}
					}
				}
			},
			//遍历，空为0
			eachArr2(arr) {
				let re = /^[0-9]+.?[0-9]*/;
				arr.forEach(item => {
					if(item) {
						for(var i in item) {
							if(re.test(item[i])) {
								if(item[i] == "") {
									item[i] = "0";
								}
							}
							if(
								i == "upperBrokerageTraffic" &&
								item["upperBrokerageTraffic"] == ""
							) {
								item[i] = "0";
							}
							if(i == "upperRewardTraffic" && item["upperRewardTraffic"] == "") {
								item[i] = "0";
							}
							if(
								i == "upperBrokerageBusiness" &&
								item["upperBrokerageBusiness"] == ""
							) {
								item[i] = "0";
							}
							if(
								i == "upperRewardBusiness" &&
								item["upperRewardBusiness"] == ""
							) {
								item[i] = "0";
							}
						}
					}
				});
				return arr;
			},
			//下一步
			toNext() {
				if(this.policylist.length == 0) {
					this.$message({
						type: "warning",
						message: "请新建政策"
					});
				} else {
					let obj = [];
					const that = this;
					obj = this.policylist.map(e => {
						//实现深拷贝
						if(typeof e === "object") {
							return Object.assign({}, e);
						} else {
							return e;
						}
					});

					new Promise(function(resolve, reject) {
							for(let i = 0; i < obj.length; i++) {
								// console.log(i);
								for(let j in obj[i]) {
									if(j == "remarks") {
										delete obj[i][j];
									}
									if(
										obj[i]["traffic"] === true ||
										obj[i]["traffic1"] === true ||
										obj[i]["traffic2"] === true ||
										obj[i]["business"] === true ||
										obj[i]["business1"] === true ||
										obj[i]["business2"] === true
									) {
										reject();
									} else {
										if(obj[i][j] === false) {
											delete obj[i][j];
										}
									}
								}
							}
							resolve(obj);
						})
						.then(obj => {
							let arr = that.eachArr2(obj);
							// console.log(arr);
							return arr;
						})
						.then(
							arr => {
								let params = {
									items: arr
								};

								this.post(
									params,
									"services/app/policy/UpdateUpperPolicyCustom"
								).then(rs => {
									if(rs.success) {
										this.$router.push({
											name: "policyupper4",
											query: {
												batchId: this.id
											}
										});
									} else {
										// console.log(this.policylist);
									}
								});
							},
							err => {
								this.$message({
									type: "warning",
									message: "信息填写错误"
								});
							}
						);
				}
			},
			//上一步
			toUp() {
				this.$router.push({
					name: "policyupper2",
					query: {
						batchId: this.id
					}
				});
			},
			toDetails(ids) {
				if(this.$route.name == "policyupper3c") {
					this.$router.push({
						name: "addup_policyupedit",
						query: {
							batchId: this.id,
							policyId: ids,
							status: this.status,
							stream: 1,
							filterType: 1
						}
					});
				} else {
					this.$router.push({
						name: "up_policyupedit",
						query: {
							batchId: this.id,
							policyId: ids,
							status: this.status,
							stream: 1,
							filterType: 1
						}
					});
				}
			},
			//详情

			toDetail(ids) {
				//区分从创建过来还是列表归来 左边高亮
				if(this.$route.name == "policyupper3c") {
					this.$router.push({
						name: "addup_policyupedit",
						query: {
							batchId: this.id,
							policyId: ids,
							status: this.status,
							stream: 1
						}
					});
				} else {
					this.$router.push({
						name: "up_policyupedit",
						query: {
							batchId: this.id,
							policyId: ids,
							status: this.status,
							stream: 1
						}
					});
				}
			},
			//复制
			tocopy(ids) {
				if(this.$route.name == "policyupper3c") {
					this.$router.push({
						name: "addup_policyupedit",
						query: {
							batchId: this.id,
							policyId: ids,
							status: this.status,
							stream: 1,
							iscopy: true
						}
					});
				} else {
					this.$router.push({
						name: "up_policyupedit",
						query: {
							batchId: this.id,
							policyId: ids,
							status: this.status,
							stream: 1,
							iscopy: true
						}
					});
				}
			},
			//新建
			toEdit() {
				this.$router.push({
					name: "up_policyupedit",
					query: {
						batchId: this.id,
						insuranceId: this.insuranceId,
						stream: 1,
						status: this.status
					}
				});
			},
			// 次序
			changeSelect(index,item){
				if(!this.iscanedit){
					if(this.moresave){
					this.$confirm("你有未保存数据，确认更改吗", "提示", {
							confirmButtonText: "确定",
							cancelButtonText: "取消",
							closeOnClickModal: false
							// type: 'warning'
						}).then(() => {
							this.numIndex = index;
						}).catch(()=>{
							
							this.numIndex=null
						})
				}else{
					this.numIndex = index;
				}
				}
				
			},
			changesone(val){
				if(this.moresave){
					this.$confirm("你有未保存数据，确认更改吗", "提示", {
							confirmButtonText: "确定",
							cancelButtonText: "取消",
							closeOnClickModal: false
							// type: 'warning'
						}).then(() => {
							this.changeSelectIndex(val)
						}).catch(()=>{
							
							this.numIndex=null
						})
				}else{
					this.changeSelectIndex(val)
				}
			},
			// 次序方法
			changeSelectIndex(val){
				console.log(val);
				console.log(this.snumbers[this.numIndex].id);
				console.log(this.snumbers);
				let params = {
					serialNumber : val,
					policyId :this.snumbers[this.numIndex].id,
					policyBatchId :this.id
				};
				this.post(params, "services/app/policy/PolicyItemSortSetting").then(rs => {
					if(rs.success) {
						this.$notify({
							title: "修改成功",
							message: "次序修改成功，刷新页面",
							type: "success",
							customClass: "el-notification-success"
						});
						this.numIndex = null;
						this.getPolicyList();
					}else{
						if(rs.error.code==1){
							this.$notify.error({
								title: "错误",
								message: "序号不能大于政策条目总条数"
							});
						}else if(rs.error.code==2){
							this.$notify.error({
								title: "错误",
								message: "序号不能小于1"
							});
						}else{
							this.$notify.error({
								title: "错误",
								message: rs.error.message
							});
						}
						
					}
				});
			}
		},
		watch: {
			islimit() {
				if(this.islimit == true) {
					this.copyinfo.expiryDate = "";
				}
			}
		}
	};
</script>
<style lang='scss' scoped>
	.toblue {
		color: #0099ff;
	}
	
	.wd100 {
		width: 100px;
		height: 32px;
	}
	
	.wd100s {
		height: 32px;
	}
	
	.set10 {
		margin-right: 10px;
	}
	
	.set30 {
		margin-left: 30px;
	}
	
	.icon-lingxing {
		font-size: 8px;
		margin-right: 5px;
		color: #FF7819;
	}
	
	.app-container {
		.app-box {
			.p-detail {
				p {
					font-size: 18px;
					color: #333;
					margin: 0 0 30px 0;
					display: flex;
					justify-content: flex-start;
					align-items: center;
					i {
						color: #ee6000;
						font-size: 18px;
						margin: 3px 12px 0 0;
					}
					span {}
					.add {
						font-size: 10px;
						color: #fff;
						background: #ff9430;
						border-radius: 8px;
						width: 30px;
						height: 15px;
						display: inline-block;
						text-align: center;
						margin-right: 10px;
						transform: scale(0.9);
					}
					.state {
						width: 50px;
						height: 20px;
						display: flex;
						justify-content: center;
						align-items: center;
						font-size: 12px;
						border-radius: 3px;
						color: #ffffff;
					}
					.state1 {
						background: #027dca;
					}
					.state2 {
						background: #389e0d;
					}
					.state3 {
						background: #666666;
					}
					.state4 {
						background: #ff7819;
					}
					.state5 {
						background: #cf1322;
					}
					.state6 {
						background: #389e0d;
					}
				}
				.editbatch {
					position: absolute;
					width: 78px;
					height: 28px;
					font-size: 13px;
					color: #027dca;
					right: 0;
					top: -3px;
					padding: 0;
					border: 0;
					outline: none;
					cursor: pointer;
					display: flex;
					justify-content: flex-end;
				}
				.d-box {
					background: #eaf5fb;
					//width: 100%;
					min-height: 79px;
					padding: 15px 30px;
					position: relative;
					p {
						margin: 0;
						span {
							font-size: 13px;
							color: #95bacc;
						}
						.d-setc {
							color: #2e94c5;
						}
						.isF:first-child {
							display: none;
						}
					}
					p:nth-of-type(1) {
						margin-bottom: 8px;
					}
					.minflao {
						width: 100%;
						min-height: 28px;
						font-size: 13px;
						color: #95bacc;
						.isF:first-child {
							display: none;
						}
						.d-setc {
							color: #2e94c5;
							margin-top: 3px;
							display: block;
							float: left;
							line-height: 28px;
						}
						.minflao_first {
							margin-top: 3px;
							display: block;
							float: left;
							line-height: 28px;
						}
					}
				}
			}
			.p-list {
				//width:100%;
				.util-table {
					//width:100%;
					height: 80px;
					border: 0;
					margin-top: 30px;
					//border-bottom:1px solid #e8e8e8;
					border-collapse: collapse;
					tr {
						th {
							background: #334750;
							color: #fff;
							border: 0;
							text-align: center;
						}
						td {
							//padding:10px 0;
							height: 45px;
							font-size: 14px;
							border-bottom: double #e8e8e8;
							.inputset {
								background: #fafafa;
								border: 1px solid #cbcbcb;
								width: 45px;
								height: 21px;
								text-align: right;
								color: #333333;
								font-size: 12px;
								padding: 3px;
								outline: none;
								border-radius: 4px;
							}
							span {
								font-size: 13px;
							}
							.setred {
								border: 1px solid #ff0000;
							}
							a {
								color: #027dca;
								font-size: 13px;
							}
							.addN {
								font-size: 14px;
								color: #027dca;
								cursor: pointer;
							}
						}
						.setc {
							text-align: center;
							font-size: 12px;
							color: #333333;
							float: left;
							width: 25%;
							line-height: 45px;
						}
						.ischange1 input {
							border: 1px solid #ff9430;
						}
						.ischange2 input {
							border: 1px solid #ff9430;
						}
						.ischange3 input {
							border: 1px solid #ff9430;
						}
						.ischange4 input {
							border: 1px solid #ff9430;
						}
						.ischange5 input {
							border: 1px solid #ff9430;
						}
						.operationout:hover .operation {
							display: block;
						}
						.operationout {
							position: relative;
							.operation {
								position: absolute;
								top: 0;
								right: -160px;
								width: 160px;
								height: 100%;
								background: pink;
								display: none;
								z-index: 33;
								line-height: 45px;
								padding: 0 10px;
							}
						}
						.btnsetc {
							text-align: center;
							margin-left: 0;
							position: relative;
							a:not(:first-of-type) {
								margin-left: 12px;
							}
							.Proportionedit_delete {
								position: absolute;
								width: 250px;
								top: 100%;
								left: -130px;
								background: red;
							}
							.Proportionedit {
								position: absolute;
								width: 420px;
								height: 164px;
								top: 100%;
								right: 0;
								display: flex;
								flex-direction: column;
								justify-content: flex-start;
								z-index: 33;
								padding: 10px 0 10px 0;
								.Proportionedit_top {
									width: 100%;
									height: 93px;
									display: flex;
									margin-bottom: 20px;
									.Proportionedit_left {
										width: 50%;
										height: 100%;
										display: flex;
										justify-content: flex-start;
										flex-direction: column;
										align-items: center;
										.Proportionedit_title {
											width: 100%;
											font-size: 14px;
											color: #40819e;
											margin: 0;
											height: 22px;
											margin-bottom: 11px;
											text-align: center;
										}
										.Proportionedit_name {
											width: 100%;
											display: flex;
											justify-content: space-around;
											align-items: center;
											height: 22px;
											margin-bottom: 5px;
											font-size: 13px;
											color: #666666;
											.Proportionedit_inp {
												width: 50px;
												font-size: 12px;
												color: #333333;
												height: 22px;
												text-align: center;
												outline: none;
												border: 1px solid #dcdfe6;
												border-radius: 4px;
											}
										}
										.actives {
											.Proportionedit_inp {
												border: 1px solid red;
											}
										}
										.activess {
											.Proportionedit_inp {
												border: 1px solid red;
											}
										}
									}
								}
								.Proportionedit_btn {
									width: 100%;
									height: 28px;
									margin-top: 27px;
									display: flex;
									justify-content: flex-end;
									align-items: center;
									button {
										background: #f7f7f7;
										border: 1px solid #dddddd;
										border-radius: 5px;
										width: 50px;
										height: 28px;
										margin-left: 20px;
										cursor: pointer;
									}
									.surebtn {
										background: #ff7819;
										border: 1px solid #ee6000;
										border-radius: 5px;
										outline: none;
										color: #ffffff;
									}
								}
							}
						}
					}
				}
			}
			.p-btn {
				text-align: center;
				margin: 20px 0;
				.setborder {
					background: #ff7819;
					border-radius: 4px;
					font-size: 14px;
					color: #ffffff;
				}
			}
		}
	}
	
	.informationaa {
		width: 100%;
		margin: 0 auto 20px;
		font-size: 12px;
		position: relative;
	}
	
	.informationaa_pipei {
		margin-top: 10px;
	}
	
	.informations {
		margin-bottom: 0;
	}
	
	.texts {
		width: 385px;
		font-size: 13px;
		color: #cbcbcb;
		letter-spacing: 0;
		text-align: left;
		text-indent: 0;
		line-height: 18px;
		.icon-xuanzhong {
			color: #ff7819;
			font-size: 8px;
		}
		span {
			color: #1989fa;
		}
	}
	
	.sscheckbox {
		position: absolute;
		left: 385px;
		top: 0;
		height: 100%;
		width: 80px;
	}
	
	.selects {
		width: 396px;
		position: relative;
	}
	
	.dialog-max {
		width: 100%;
		height: 200px;
	}
	
	.dialog-sec-wp {
		text-align: center;
		padding-top: 10px;
		padding-bottom: 0;
		margin-left: -100px;
	}
	
	.dateinp {
		font-size: 12px;
		width: 170px;
	}
	
	.informationdd {
		padding-top: 10px;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	
	.btn {
		display: block;
		margin-left: -100px;
	}
	
	.util-table th:first-child,
	.util-table .util-tab:first-child {
		padding: 0;
	}
	
	.havebor {
		th {
			border: 1px solid red;
		}
	}
	
	.candeletes {
		margin-bottom: 20px;
	}
	
	.btncenters {
		width: 100%;
		height: auto;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	
	.btncenter {
		display: block;
		margin: 0 auto;
	}
	
	.line {
		text-align: center;
	}
	
	.app-container .app-box .p-detail .texts {
		width: 328px;
		//   margin-top: 10px;
		font-size: 13px;
		color: #cbcbcb;
		letter-spacing: 0;
		text-align: left;
		text-indent: 0;
		//   margin: 10px 0 20px 0;
		line-height: 28px;
		.icon-xuanzhong {
			color: #ff7819;
			font-size: 8px;
		}
		span {
			color: #1989fa;
		}
	}
	
	.app-container .policyupper3c .p-detail .dialog-tit {
		font-size: 14px;
	}
	
	.Percentage_color {
		color: #999;
	}
	
	.backshows {
		background: rgba(249, 225, 202, 0.5);
	}
	
	.isfrontshow,
	.isseconshow {
		border: 1px solid red !important;
	}
	
	.isdis {
		background-color: #f5f7fa;
		border-color: #e4e7ed;
		color: #c0c4cc;
		cursor: not-allowed;
		color: #333;
	}
	
	.tables {
		width: 100%;
		min-width: 940px;
		margin-top: 30px;
		box-sizing: border-box;
		.tables_top {
			width: 100%;
			height: 80px;
			background: #334750;
			color: #ffffff;
			font-size: 14px;
			.tablestop_left {
				width: 48%;
				height: 100%;
				float: left;
				line-height: 80px;
				text-indent: 49px;
				.tablestop_dir {
					margin-left: 40px;
				}
			}
			.tablestop_cen {
				width: 40%;
				float: left;
				height: 100%;
				border-right: 1px solid #e8e8e8;
				border-left: 1px solid #e8e8e8;
				box-sizing: border-box;
				.cen_top {
					width: 100%;
					height: 50%;
					border-bottom: 1px solid #e8e8e8;
					box-sizing: border-box;
					span {
						display: block;
						width: 40%;
						height: 100%;
						box-sizing: border-box;
						float: left;
						line-height: 40px;
						text-align: center;
					}
					.cen_top_che {
						width: 20%;
						span {
							width: 100%;
						}
					}
					.cen_top_bor {
						border-right: 1px solid #e8e8e8;
						span {
							width: 50%;
						}
					}
				}
				.cen_bom {
					width: 100%;
					height: 50%;
					span {
						display: block;
						width: 40%;
						height: 100%;
						box-sizing: border-box;
						float: left;
						line-height: 40px;
						text-align: center;
					}
					.cen_top_che {
						width: 20%;
						span {
							width: 100%;
						}
					}
					.cen_top_bor {
						border-right: 1px solid #e8e8e8;
						span {
							width: 50%;
						}
					}
				}
			}
			.tablestop_right {
				width: 12%;
				float: left;
				height: 100%;
				line-height: 80px;
				text-align: center;
			}
		}
		.tables_cont {
			width: 100%;
			// background: #fafafa;
			border-bottom: 1px solid #e8e8e8;
			.tablescont_left {
				width: 48%;
				//height: 45px;
				float: left;
				position: relative;
				padding: 0 10px 0 102px;
				min-height: 45px;
				// line-height: 45px;
				// text-indent: 10px;
				.posIcon{
					color: #606266;
					position: absolute;
					left: 10px;
					top: 16px;
					cursor:pointer;
				}
				.tablescont_num {
					color: #666666;
					position: absolute;
					left: 49px;
					top: 17px;
				}
				.tablescont_num2{
					color: #666666;
					position: absolute;
					left: 40px;
					top: 10px;
				}
				.tablescont_dis {
					color: #333333;
					font-weight: 700;
					display: table-cell;
					vertical-align: middle;
					line-height: 20px;
					height: 45px;
				}
			}
			.tablescont_left:after {
				display: block;
				width: 1px;
				height: 100%;
				position: absolute;
				right: -1px;
				top: 0;
				background: #e8e8e8;
				content: '';
			}
			.tablescont_cen {
				width: 40%;
				height: 45px;
				float: left;
				border-right: 1px solid #e8e8e8;
				border-left: 1px solid #e8e8e8;
				box-sizing: border-box;
				line-height: 45px;
				cursor: pointer;
				position: relative;
				.tablescont_cen_float {
					display: block;
					width: 40%;
					height: 100%;
					box-sizing: border-box;
					float: left;
					line-height: 40px;
					text-align: center;
					.tablescontcen_input {
						display: block;
						width: 50%;
						height: 100%;
						box-sizing: border-box;
						float: left;
						.isfrontshow,
						.isseconshow {
							border: 1px solid red;
						}
						input {
							width: 50px;
							height: 22px;
							outline: none;
							background: #ffffff;
							border: 1px solid #cbcbcb;
							border-radius: 4px;
							text-align: right;
							padding-right: 5px;
						}
					}
					.ischange1 input {
						border: 1px solid #ff9430;
					}
					.ischange2 input {
						border: 1px solid #ff9430;
					}
					.ischange3 input {
						border: 1px solid #ff9430;
					}
					.ischange4 input {
						border: 1px solid #ff9430;
					}
					.ischange5 input {
						border: 1px solid #ff9430;
					}
				}
				.tablescont_cen_che {
					width: 20%;
					.tablescontcen_input {
						width: 100%;
					}
				}
				.cen_top_bor {
					border-right: 1px solid #e8e8e8;
				}
			}
			.backshows {
				background: rgba(249, 225, 202, 0.5);
			}
			.tablescont_right {
				width: 12%;
				height: 45px;
				float: left;
				line-height: 45px;
				text-align: center;
				color: #027dca;
				.tablescont_right_edit {
					margin: 0 10px;
				}
				.tablescont_right_delete {
					color: red;
					cursor: pointer;
				}
			}
			.shoedetails {
				width: 100%;
				border-top: 1px solid #e8e8e8;
				margin-bottom: 10px;
				.detail_left {
					width: 100%;
					float: left;
					border-right: 1px solid #e8e8e8;
					box-sizing: content-box;
					.detailname {
						color: #333;
						font-weight: 500;
						width: 153px;
						min-width: 153px;
						text-indent: 91px;
						height: 10px;
						height: 35px;
						line-height: 35px;
						margin: 0;
						padding: 0;
					}
					.detailCon {
						width: 185%;
						-moz-column-count: 2;
						/* Firefox */
						-webkit-column-count: 2;
						column-count: 2;
						-moz-column-gap: 0;
						/* Firefox */
						-webkit-column-gap: 0;
						column-gap: 10px;
					}
					.detailconytent {
						width: 96%;
						min-height: 22px;
						// float: left;
						font-family: PingFangSC-Regular;
						font-size: 13px;
						color: #666666;
						// border-top: 1px solid #ebebeb;
						p {
							float: left;
							word-break: break-all;
							line-height: 35px;
							min-height: 22px;
							margin: 0;
							padding: 0;
							box-sizing: border-box;
							padding: 0 0px;
							padding-left: 7px;
						}
						.spanname {
							width: 109px;
							text-align: left;
							// text-indent: 10px;
							img {
								width: 9px;
								margin-left: 5px;
								margin-right: 5px;
							}
							// border-right: 1px solid #ebebeb;
						}
						.spantext {
							width: 70%;
							min-width: 235px;
							// border-left: 1px solid #ebebeb;
							margin-left: -1px;
							color: #151515;
							break-inside: avoid;
						}
					}
					.detailconytent:last-child {
						// border-bottom: 1px solid #e8e8e8;
					}
				}
				@media screen and (min-width: 1280px) and (max-width: 1430px) {
					.detailconytent {
						width: 100% !important;
					}
					.spantext {
						width: 80%;
						//  max-width: 255px;
						// border-left: 1px solid #ebebeb;
						margin-left: -1px;
						color: #151515;
						break-inside: avoid;
					}
					.tables .tables_cont .shoedetails .detail_right .detailconytent .spanname {
						width: 31% !important;
					}
				}
				.detail_right {
					width: 100%;
					float: left;
					height: 100%;
					// border-left: 1px solid #e8e8e8;
					margin-left: -1px;
					box-sizing: content-box;
					.detailname {
						color: #333;
						font-weight: 500;
						width: 153px;
						min-width: 153px;
						text-indent: 91px;
						height: 10px;
						height: 35px;
						line-height: 35px;
						margin: 0;
						padding: 0;
					}
					.detailCon {
						width: 185%;
						-moz-column-count: 2;
						/* Firefox */
						-webkit-column-count: 2;
						column-count: 2;
						-moz-column-gap: 0;
						/* Firefox */
						-webkit-column-gap: 0;
						column-gap: 10px;
					}
					.detailconytent {
						width: 96%;
						min-height: 35px;
						// float: left;
						font-family: PingFangSC-Regular;
						font-size: 13px;
						color: #666666;
						// border-top: 1px solid #ebebeb;
						p {
							float: left;
							word-break: break-all;
							line-height: 35px;
							min-height: 22px;
							margin: 0;
							padding: 0;
							box-sizing: border-box;
							padding: 0 0px;
							padding-left: 7px;
						}
						.spanname {
							width: 109px;
							text-align: left;
							// text-indent: 10px;
							img {
								width: 9px;
								margin-left: 5px;
								margin-right: 5px;
							}
							// border-right: 1px solid #ebebeb;
						}
						.spantext {
							width: 71%;
							min-width: 235px;
							// border-left: 1px solid #ebebeb;
							margin-left: -1px;
							color: #151515;
							break-inside: avoid;
						}
					}
					.detailconytent:last-child {
						// border-bottom: 1px solid #e8e8e8;
					}
				}
			}
		}
		.tables_cont:nth-child(odd) {
			background: #fafafa;
		}
		.tables_cont:nth-child(even) {
			background: #fff;
		}
		.tables_bom {
			width: 100%;
			height: 45px;
			border-bottom: 1px solid #e8e8e8;
			line-height: 45px;
			color: #027dca;
			.tables_bom_left {
				width: 48%;
				height: 100%;
				float: left;
				font-size: 14px;
				text-indent: 10px;
				span {
					cursor: pointer;
				}
			}
			.tables_bom_cen {
				width: 40%;
				height: 100%;
				float: left;
				border-right: 1px solid #e8e8e8;
				border-left: 1px solid #e8e8e8;
				box-sizing: border-box;
				text-align: center;
				span {
					cursor: pointer;
				}
				.havemaoe {
					color: #999;
				}
			}
			.tables_bom_right {
				width: 12%;
				height: 100%;
				float: left;
			}
		}
	}
	
	.Dismissal {
		width: 100%;
		height: 28px;
		background: #fef1f1;
		border-radius: 5px;
		font-size: 13px;
		color: #cf1322;
		margin-bottom: 22px;
		line-height: 28px;
		text-indent: 30px;
	}
	
	.adoptorreject {
		width: 100%;
		height: 225px;
		background: #fafafa;
		border: 1px solid #d9d9d9;
		border-radius: 5px;
		padding: 20px;
		text-align: left;
		padding-top: 1px;
		.adoptdis {
			width: 100%;
			font-size: 14px;
			color: #333333;
			font-weight: 700;
		}
		.adoptresult {
			width: 100%;
			min-height: 20px;
			line-height: 20px;
			margin-top: 20px;
			p {
				width: 70px;
				margin: 0;
				padding: 0;
				margin-right: 10px;
				float: left;
			}
			div {
				float: left;
			}
		}
	}
	
	.adoptresultbom {
		width: calc(100% - 80px);
	}
	
	.reason_wid {
		width: 100%;
		min-width: 780px;
	}
	
	.adoptsub {
		display: block;
		margin: 20px auto 0;
		width: 120px;
	}
	
	.backshows:hover .poper_operation {
		display: block;
	}
	
	.poper_operation {
		position: absolute;
		top: 0;
		right: -100px;
		width: 100px;
		height: 40px;
		margin-top: 2.5px;
		background: #fcf0e3;
		border: 1px solid #ebeef5;
		color: #027dca;
		text-align: center;
		cursor: pointer;
		font-size: 13px;
		display: none;
		line-height: 40px;
		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
		span:first-child {
			margin-right: 15px;
		}
	}
	
	.poper_operation::after {
		width: 6px;
		height: 6px;
		position: absolute;
		top: 50%;
		margin-top: -6px;
		display: block;
		content: "";
		left: -6px;
		width: 0;
		height: 0;
		border-width: 6px 6px 6px 0;
		border-style: solid;
		border-color: transparent #fcf0e3 transparent transparent;
		/*透明 灰 透明 透明 */
	}
	
	.nodata {
		margin-top: 10px;
		width: 100%;
		height: 30px;
		line-height: 30px;
		text-align: center;
	}
	
	.toblue {
		color: #0099ff;
	}
	
	.visi-list {
		width: 100%;
		height: 200px;
		border: 1px solid #eee;
		border-bottom: 0;
		overflow-y: auto;
		box-sizing: border-box;
		div {
			width: 50%;
			height: 40px;
			float: left;
			border-bottom: 1px solid #eee;
			line-height: 40px;
		}
		.list_name {
			text-indent: 20px;
			border-right: 1px solid #eee;
		}
		.list_time {
			text-indent: 20px;
		}
	}
</style>
<style type="text/css">
	.toDis-dialog2 .el-row {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	
	.toDis-dialog2 .el-form-item__content {
		margin-left: 0 !important;
	}
	
	.toDis-dialog2 .dialog-sec-wp {
		margin-left: 0 !important;
	}
	
	.diqu {
		max-height: 500px;
		overflow: auto;
		padding: 0 5px;
		max-width: 700px;
	}

	.iIcon{
		display: none;
	}
	.spanhover{
		cursor: pointer;
		color:#027dca;
		border-bottom:1px solid #027dca;
	}
	.selectIndex{
		width:55px;
	}
	.tablescont_num:hover .iIcon{
		display: inline;
		color:#027dca;
		cursor: pointer;
	}
</style>